<template>
  <div class="app-container">
    <div class="filter-container">
      <el-form :inline="true" :model="formModel">
        <el-form-item class="no-warn-item" label="VIN号:" prop="vin">
          <el-input
            v-model="formModel.vin"
            class="filter-item "
            clearable
          />
        </el-form-item>
        <el-row class="submit-area">
          <el-col :span="24">
            <el-button
              v-if="hasPermission('updateKeyPartTrack_select')"
              type="primary"
              plain
              @click="queryList(false)"
            >查询
            </el-button>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <hey-table ref="table" :table-data="tableData" :columns="columns" :auto-width="false">
      <template slot="tools" />
    </hey-table>
  </div>
</template>

<script>

export default {
  name: 'UpdateKeyPartTrackList',
  props: {},
  data() {
    return {
      tableData: [],
      // 查询条件
      formModel: {
        vin: '',
        partTrackNo: '',
        materialNo: '',
        beginTime: '',
        endTime: ''
      },
      columns: [
        { title: 'VIN号', key: 'vin' },
        { title: '追溯代码', key: 'partTrackNo' },
        { title: '追溯组件号', key: 'groupNumber' },
        { title: '物料编码', key: 'materialNo' },
        { title: '原物料追溯条码', key: 'scanTrackNo' },
        { title: '新物料追溯条码', key: 'newScanTrackNo' },
        { title: '追溯工位代码', key: 'ulocNo' }
      ]
    }
  },
  computed: {},
  mounted() {
    this.queryList()
  },
  methods: {
    queryList() {
      this.$refs.table.query('/updateKeyPartTrack/pageUpdateKeyPartTrack', this.formModel, '', false)
    }
  }
}
</script>
